From 11726b7270fd350993d6136844587e06e6d94b6b Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 5 Nov 2025 12:41:02 +0100 Subject: [PATCH] pointerA11yTimeout: Set the cursor through ClutterActor API Set the cursor on the stage. This differs with the "root" cursor approach in that actors with a non-inherited cursor (e.g. I-beam on text actors) will stick to that instead of showing the cursor as set here. If that's turns out not to be enough, might make sense to move this piece of a11y feedback to Mutter. Part-of: --- js/ui/pointerA11yTimeout.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/ui/pointerA11yTimeout.js b/js/ui/pointerA11yTimeout.js index b96b4ec1a..8e77719b9 100644 --- a/js/ui/pointerA11yTimeout.js +++ b/js/ui/pointerA11yTimeout.js @@ -1,6 +1,5 @@ import Clutter from 'gi://Clutter'; import GObject from 'gi://GObject'; -import Meta from 'gi://Meta'; import St from 'gi://St'; import * as Main from './main.js'; import Cairo from 'gi://cairo'; @@ -123,7 +122,7 @@ export class PointerA11yTimeout { this._pieTimer.start(x, y, timeout); if (type === Clutter.PointerA11yTimeoutType.GESTURE) - global.display.set_cursor(Meta.Cursor.CROSSHAIR); + global.stage.set_cursor_type(Clutter.CursorType.CROSSHAIR); }); seat.connect('ptr-a11y-timeout-stopped', (o, type, clicked) => { @@ -131,7 +130,7 @@ export class PointerA11yTimeout { this._pieTimer?.destroy(); if (type === Clutter.PointerA11yTimeoutType.GESTURE) - global.display.set_cursor(Meta.Cursor.DEFAULT); + global.stage.set_cursor_type(Clutter.CursorType.DEFAULT); }); } } -- 2.39.5